package com.demo;

/**
 * @author ytj
 * @date 2022/2/21
 */
public class Single5 {
    private static Single5 instance;

    private Single5(){

    }

    public static synchronized Single5 getInstance(){
        if(instance!=null){
            return instance;
        }
        synchronized (Single5.class){
            if(instance==null){
                instance=new Single5();
            }
        }
        return instance;
    }
}
